// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) radix(10) lradix(10) 
// Source File Name:   SetFldPanel.java

package nc.ui.iuforeport.businessquery;

import com.borland.jbcl.layout.VerticalFlowLayout;
import java.awt.BorderLayout;
import java.awt.Insets;
import java.awt.event.*;
import java.io.PrintStream;
import java.util.Hashtable;
import javax.swing.JFrame;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.*;
import nc.ui.ml.NCLangRes;
import nc.ui.pub.beans.*;
import nc.ui.pub.querymodel.UIUtil;
import nc.vo.iuforeport.businessquery.*;
import nc.vo.pub.querymodel.QueryConst;

// Referenced classes of package nc.ui.iuforeport.businessquery:
//            FldGenDlg, SetTablePanel, RowNoCellRenderer, QueryDefTabbedPn, 
//            SetOrderbyPanel, SetCrossPanel

public class SetFldPanel extends UIPanel
    implements ListSelectionListener
{
    class IvjEventHandler
        implements ActionListener, MouseListener
    {

        public void actionPerformed(ActionEvent e)
        {
            if(e.getSource() == getBnAdd())
                connEtoC1(e);
            if(e.getSource() == getBnDel())
                connEtoC3(e);
            if(e.getSource() == getBnModify())
                connEtoC2(e);
            if(e.getSource() == getBnUp())
                connEtoC4(e);
            if(e.getSource() == getBnDown())
                connEtoC5(e);
        }

        public void mouseClicked(MouseEvent e)
        {
            if(e.getSource() == getPnEast() && e.getClickCount() == 2)
                connEtoC6(e);
        }

        public void mouseEntered(MouseEvent mouseevent)
        {
        }

        public void mouseExited(MouseEvent mouseevent)
        {
        }

        public void mousePressed(MouseEvent mouseevent)
        {
        }

        public void mouseReleased(MouseEvent mouseevent)
        {
        }

        final SetFldPanel this$0;

        IvjEventHandler()
        {
            this$0 = SetFldPanel.this;
//            super();
        }
    }


    public SetFldPanel()
    {
        m_parent = null;
        m_fldGenDlg = null;
        ivjPnEast = null;
        ivjPnNorth = null;
        ivjPnSouth = null;
        ivjPnWest = null;
        ivjTablePn = null;
        ivjBnAdd = null;
        ivjBnDel = null;
        ivjBnModify = null;
        ivjBnUp = null;
        ivjBnDown = null;
        ivjEventHandler = new IvjEventHandler();
        initialize();
    }

    public SetFldPanel(boolean p0)
    {
        super(p0);
        m_parent = null;
        m_fldGenDlg = null;
        ivjPnEast = null;
        ivjPnNorth = null;
        ivjPnSouth = null;
        ivjPnWest = null;
        ivjTablePn = null;
        ivjBnAdd = null;
        ivjBnDel = null;
        ivjBnModify = null;
        ivjBnUp = null;
        ivjBnDown = null;
        ivjEventHandler = new IvjEventHandler();
    }

    public void bnAdd_ActionPerformed(ActionEvent actionEvent)
    {
        FldGenDlg dlg = getFldGenDlg();
        Hashtable hashFldAlias = new Hashtable();
        for(int i = 0; i < getTM().getRowCount(); i++)
            hashFldAlias.put(getTM().getValueAt(i, 3), getTM().getValueAt(i, 2));

        dlg.setHashFldAlias(hashFldAlias);
        dlg.doClear();
        dlg.setBnAddEnabled(true);
        dlg.showModal();
        dlg.destroy();
        if(dlg.getResult() == 1)
            if(dlg.isMultiSelect())
            {
                SelectFldVO newsfs[] = dlg.getGenFlds();
                doAdd(newsfs);
            } else
            {
                SelectFldVO newsf = dlg.getGenFld();
                doAdd(newsf);
            }
    }

    public void bnDel_ActionPerformed(ActionEvent actionEvent)
    {
        int iSelIndex[] = getTable().getSelectedRows();
        if(iSelIndex == null || iSelIndex.length == 0)
            return;
        for(int i = iSelIndex.length - 1; i >= 0; i--)
            doDel(iSelIndex[i]);

    }

    private void doDel(int iSelIndex)
    {
        if(iSelIndex != -1)
        {
            getTM().removeRow(iSelIndex);
            if(iSelIndex != 0)
                getTable().getSelectionModel().setSelectionInterval(iSelIndex - 1, iSelIndex - 1);
            else
            if(getTable().getRowCount() != 0)
                getTable().getSelectionModel().setSelectionInterval(0, 0);
            QueryBaseDef qbd = m_parent.getQueryBaseDef();
            nc.vo.pub.ValueObject vos[] = QueryUtil.delFromVOs(qbd.getSelectFlds(), iSelIndex);
            SelectFldVO newsfs[] = new SelectFldVO[vos.length];
            for(int i = 0; i < vos.length; i++)
                newsfs[i] = (SelectFldVO)vos[i];

            qbd.setSelectFlds(newsfs);
            getQueryDefTabbedPn().getPnSetOrderbyPub().setResultToOrderby(newsfs, null);
//            getQueryDefTabbedPn().getPnSetCrossPub().clearRotateCross(newsfs);
        }
    }

    public void bnDown_ActionPerformed(ActionEvent actionEvent)
    {
        if(getTable().getCellEditor() != null)
            getTable().getCellEditor().stopCellEditing();
        int iSelIndex = getTable().getSelectedRow();
        getTable().scrollRectToVisible(getTable().getCellRect(iSelIndex, 0, false));
        if(iSelIndex != -1 && iSelIndex < getTable().getRowCount() - 1)
        {
            getTM().moveRow(iSelIndex, iSelIndex, iSelIndex + 1);
            getTable().getSelectionModel().setSelectionInterval(iSelIndex + 1, iSelIndex + 1);
            QueryBaseDef qbd = m_parent.getQueryBaseDef();
            SelectFldVO oldSfs[] = qbd.getSelectFlds();
            SelectFldVO newsfs[] = new SelectFldVO[oldSfs.length];
            for(int i = 0; i < oldSfs.length; i++)
            {
                if(i == iSelIndex)
                {
                    newsfs[i] = oldSfs[iSelIndex + 1];
                    continue;
                }
                if(i == iSelIndex + 1)
                    newsfs[i] = oldSfs[iSelIndex];
                else
                    newsfs[i] = oldSfs[i];
            }

            qbd.setSelectFlds(newsfs);
        }
    }

    public void bnModify_ActionPerformed(ActionEvent actionEvent)
    {
        int iSelIndex = getTable().getSelectedRow();
        if(iSelIndex != -1)
        {
            FldGenDlg dlg = getFldGenDlg();
            Hashtable hashFldAlias = new Hashtable();
            for(int i = 0; i < getTM().getRowCount(); i++)
                if(i != iSelIndex)
                    hashFldAlias.put(getTM().getValueAt(i, 3), getTM().getValueAt(i, 2));

            dlg.setHashFldAlias(hashFldAlias);
            dlg.doSetInfo(new Object[] {
                getTM().getValueAt(iSelIndex, 2), getTM().getValueAt(iSelIndex, 3), getTM().getValueAt(iSelIndex, 1), getTM().getValueAt(iSelIndex, 4)
            });
            dlg.setBnAddEnabled(false);
            dlg.showModal();
            dlg.destroy();
            if(dlg.getResult() == 1)
            {
                getTM().removeRow(iSelIndex);
                SelectFldVO newsf = dlg.getGenFld();
                getTM().insertRow(iSelIndex, new Object[] {
                    "", newsf.getExpression(), newsf.getFldname(), newsf.getFldalias(), newsf.getNote()
                });
                getTable().getSelectionModel().setSelectionInterval(iSelIndex, iSelIndex);
                QueryBaseDef qbd = m_parent.getQueryBaseDef();
                SelectFldVO oldSfs[] = qbd.getSelectFlds();
                SelectFldVO newsfs[] = new SelectFldVO[oldSfs.length];
                for(int i = 0; i < oldSfs.length; i++)
                    if(i == iSelIndex)
                        newsfs[i] = newsf;
                    else
                        newsfs[i] = oldSfs[i];

                qbd.setSelectFlds(newsfs);
                getQueryDefTabbedPn().getPnSetOrderbyPub().setResultToOrderby(newsfs, null);
//                getQueryDefTabbedPn().getPnSetCrossPub().clearRotateCross(newsfs);
            }
        }
    }

    public void bnUp_ActionPerformed(ActionEvent actionEvent)
    {
        if(getTable().getCellEditor() != null)
            getTable().getCellEditor().stopCellEditing();
        int iSelIndex = getTable().getSelectedRow();
        getTable().scrollRectToVisible(getTable().getCellRect(iSelIndex, 0, false));
        if(iSelIndex > 0)
        {
            getTM().moveRow(iSelIndex, iSelIndex, iSelIndex - 1);
            getTable().getSelectionModel().setSelectionInterval(iSelIndex - 1, iSelIndex - 1);
            QueryBaseDef qbd = m_parent.getQueryBaseDef();
            SelectFldVO oldSfs[] = qbd.getSelectFlds();
            SelectFldVO newsfs[] = new SelectFldVO[oldSfs.length];
            for(int i = 0; i < oldSfs.length; i++)
            {
                if(i == iSelIndex - 1)
                {
                    newsfs[i] = oldSfs[iSelIndex];
                    continue;
                }
                if(i == iSelIndex)
                    newsfs[i] = oldSfs[iSelIndex - 1];
                else
                    newsfs[i] = oldSfs[i];
            }

            qbd.setSelectFlds(newsfs);
        }
    }

    public String check()
    {
        int iLen = getTM().getRowCount();
        if(iLen == 0 && getQueryDefTabbedPn().getPnSetTablePub().getTM().getRowCount() != 0)
            return NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000891");
        else
            return null;
    }

    private void connEtoC1(ActionEvent arg1)
    {
        try
        {
            bnAdd_ActionPerformed(arg1);
        }
        catch(Throwable ivjExc)
        {
            handleException(ivjExc);
        }
    }

    private void connEtoC2(ActionEvent arg1)
    {
        try
        {
            bnModify_ActionPerformed(arg1);
        }
        catch(Throwable ivjExc)
        {
            handleException(ivjExc);
        }
    }

    private void connEtoC3(ActionEvent arg1)
    {
        try
        {
            bnDel_ActionPerformed(arg1);
        }
        catch(Throwable ivjExc)
        {
            handleException(ivjExc);
        }
    }

    private void connEtoC4(ActionEvent arg1)
    {
        try
        {
            bnUp_ActionPerformed(arg1);
        }
        catch(Throwable ivjExc)
        {
            handleException(ivjExc);
        }
    }

    private void connEtoC5(ActionEvent arg1)
    {
        try
        {
            bnDown_ActionPerformed(arg1);
        }
        catch(Throwable ivjExc)
        {
            handleException(ivjExc);
        }
    }

    private void connEtoC6(MouseEvent arg1)
    {
        try
        {
            pnEast1_MouseClicked(arg1);
        }
        catch(Throwable ivjExc)
        {
            handleException(ivjExc);
        }
    }

    public void doAdd(SelectFldVO newsfs[])
    {
        int iLen = newsfs != null ? newsfs.length : 0;
        for(int i = 0; i < iLen; i++)
            doAdd(newsfs[i]);

    }

    public void doAdd(SelectFldVO newsf)
    {
        getTM().addRow(new Object[] {
            "", newsf.getExpression(), newsf.getFldname(), newsf.getFldalias(), newsf.getNote()
        });
        getTable().getSelectionModel().setSelectionInterval(getTM().getRowCount() - 1, getTM().getRowCount() - 1);
        QueryBaseDef qbd = m_parent.getQueryBaseDef();
        SelectFldVO oldVOs[] = qbd.getSelectFlds();
        nc.vo.pub.ValueObject vos[] = QueryUtil.addToVOs(oldVOs, newsf);
        SelectFldVO newsfs[] = new SelectFldVO[vos.length];
        for(int i = 0; i < vos.length; i++)
            newsfs[i] = (SelectFldVO)vos[i];

        qbd.setSelectFlds(newsfs);
        getQueryDefTabbedPn().getPnSetOrderbyPub().setResultToOrderby(newsfs, null);
//        getQueryDefTabbedPn().getPnSetCrossPub().clearRotateCross(newsfs);
    }

    private UIButton getBnAdd()
    {
        if(ivjBnAdd == null)
            try
            {
                ivjBnAdd = new UIButton();
                ivjBnAdd.setName("BnAdd");
                ivjBnAdd.setText(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000330"));
                ivjBnAdd.setPreferredSize(UIUtil.getDimFit2Text(ivjBnAdd, ivjBnAdd.getText()));
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjBnAdd;
    }

    private UIButton getBnDel()
    {
        if(ivjBnDel == null)
            try
            {
                ivjBnDel = new UIButton();
                ivjBnDel.setName("BnDel");
                ivjBnDel.setText(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000091"));
                ivjBnDel.setPreferredSize(UIUtil.getDimFit2Text(ivjBnDel, ivjBnDel.getText()));
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjBnDel;
    }

    private UIButton getBnDown()
    {
        if(ivjBnDown == null)
            try
            {
                ivjBnDown = new UIButton();
                ivjBnDown.setName("BnDown");
                ivjBnDown.setText(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000146"));
                ivjBnDown.setPreferredSize(UIUtil.getDimFit2Text(ivjBnDown, ivjBnDown.getText()));
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjBnDown;
    }

    private UIButton getBnModify()
    {
        if(ivjBnModify == null)
            try
            {
                ivjBnModify = new UIButton();
                ivjBnModify.setName("BnModify");
                ivjBnModify.setText(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000401"));
                ivjBnModify.setPreferredSize(UIUtil.getDimFit2Text(ivjBnModify, ivjBnModify.getText()));
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjBnModify;
    }

    private UIButton getBnUp()
    {
        if(ivjBnUp == null)
            try
            {
                ivjBnUp = new UIButton();
                ivjBnUp.setName("BnUp");
                ivjBnUp.setText(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000145"));
                ivjBnUp.setPreferredSize(UIUtil.getDimFit2Text(ivjBnUp, ivjBnUp.getText()));
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjBnUp;
    }

    public FldGenDlg getFldGenDlg()
    {
        if(m_fldGenDlg == null)
        {
            m_fldGenDlg = new FldGenDlg(this);
            m_fldGenDlg.setQueryBaseDef(m_parent.getQueryBaseDef());
        }
        return m_fldGenDlg;
    }

    public Hashtable getHashAliasFldVo()
    {
        Hashtable hashAliasFld = new Hashtable();
        SelectFldVO sfs[] = getResultFromFld();
        int iLen = sfs != null ? sfs.length : 0;
        for(int i = 0; i < iLen; i++)
            hashAliasFld.put(sfs[i].getFldalias(), sfs[i]);

        return hashAliasFld;
    }

    public OrderbyFldVO[] getOrderResultFromFld()
    {
        return null;
    }

    private UIPanel getPnEast()
    {
        if(ivjPnEast == null)
            try
            {
                ivjPnEast = new UIPanel();
                ivjPnEast.setName("PnEast");
                ivjPnEast.setLayout(new VerticalFlowLayout(1, 5, 20, true, false));
                getPnEast().add(getBnAdd());
                getPnEast().add(getBnModify());
                getPnEast().add(getBnDel());
                getPnEast().add(getBnUp());
                getPnEast().add(getBnDown());
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjPnEast;
    }

    private UIPanel getPnNorth()
    {
        if(ivjPnNorth == null)
            try
            {
                ivjPnNorth = new UIPanel();
                ivjPnNorth.setName("PnNorth");
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjPnNorth;
    }

    private UIPanel getPnSouth()
    {
        if(ivjPnSouth == null)
            try
            {
                ivjPnSouth = new UIPanel();
                ivjPnSouth.setName("PnSouth");
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjPnSouth;
    }

    private UIPanel getPnWest()
    {
        if(ivjPnWest == null)
            try
            {
                ivjPnWest = new UIPanel();
                ivjPnWest.setName("PnWest");
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjPnWest;
    }

    public QueryDefTabbedPn getQueryDefTabbedPn()
    {
        return m_parent;
    }

    public SelectFldVO[] getResultFromFld()
    {
        int iRowCount = getTable().getRowCount();
        SelectFldVO sfs[] = new SelectFldVO[iRowCount];
        for(int i = 0; i < iRowCount; i++)
        {
            sfs[i] = new SelectFldVO();
            sfs[i].setExpression(getTM().getValueAt(i, 1).toString());
            sfs[i].setFldname(getTM().getValueAt(i, 2).toString());
            sfs[i].setFldalias(getTM().getValueAt(i, 3).toString());
            Object objNote = getTM().getValueAt(i, 4);
            String strNote = objNote != null ? objNote.toString() : "";
            sfs[i].setNote(strNote);
        }

        return sfs;
    }

    public UITable getTable()
    {
        return getTablePn().getTable();
    }

    private UITablePane getTablePn()
    {
        if(ivjTablePn == null)
            try
            {
                ivjTablePn = new UITablePane();
                ivjTablePn.setName("TablePn");
            }
            catch(Throwable ivjExc)
            {
                handleException(ivjExc);
            }
        return ivjTablePn;
    }

    public DefaultTableModel getTM()
    {
        return (DefaultTableModel)getTable().getModel();
    }

    private void handleException(Throwable exception)
    {
        System.out.println("--------- \u672A\u6355\u6349\u5230\u7684\u5F02\u5E38 ---------");
        exception.printStackTrace(System.out);
    }

    private void initConnections()
        throws Exception
    {
        getBnAdd().addActionListener(ivjEventHandler);
        getBnDel().addActionListener(ivjEventHandler);
        getBnModify().addActionListener(ivjEventHandler);
        getBnUp().addActionListener(ivjEventHandler);
        getBnDown().addActionListener(ivjEventHandler);
        getPnEast().addMouseListener(ivjEventHandler);
    }

    private void initialize()
    {
        try
        {
            setName("SetTablePanel");
            setLayout(new BorderLayout());
            setSize(400, 240);
            add(getPnSouth(), "South");
            add(getPnWest(), "West");
            add(getPnNorth(), "North");
            add(getPnEast(), "East");
            add(getTablePn(), "Center");
            initConnections();
        }
        catch(Throwable ivjExc)
        {
            handleException(ivjExc);
        }
        initTable();
        setTableCell();
        getTable().setAutoResizeMode(0);
        getTable().setColumnWidth(new int[] {
            20, 244, 120, 88, 72
        });
    }

    public void initTable()
    {
        DefaultTableModel tm = new DefaultTableModel(new Object[] {
            "", NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000892"), NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000893"), NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000894"), NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000142")
        }, 0) {

            public int getColumnCount()
            {
                return 5;
            }

            public Class getColumnClass(int col)
            {
                return java.lang.Object.class;
            }

            public boolean isCellEditable(int row, int col)
            {
                return false;
            }

            final SetFldPanel this$0;

            
            {
                this$0 = SetFldPanel.this;
//                super(x0, x1);
            }
        }
;
        getTable().setModel(tm);
        getTable().setSelectionMode(2);
        getTable().getTableHeader().setBackground(QueryConst.HEADER_BACK_COLOR);
        getTable().getTableHeader().setForeground(QueryConst.HEADER_FORE_COLOR);
        getTable().getSelectionModel().addListSelectionListener(this);
    }

    private void killBPM()
    {
        SelectFldVO sf = null;
        Hashtable hashFldAlias = new Hashtable();
        for(int i = 0; i < getTM().getRowCount(); i++)
            hashFldAlias.put(getTM().getValueAt(i, 3), getTM().getValueAt(i, 2));

        sf = new SelectFldVO();
        sf.setFldalias("bpmmeasure");
        sf.setFldname(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000895"));
        sf.setExpression("' '");
        if(!hashFldAlias.containsKey(sf.getFldalias()))
            doAdd(sf);
        sf = new SelectFldVO();
        sf.setFldalias("bpmscenario");
        sf.setFldname(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000896"));
        sf.setExpression(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000897"));
        if(!hashFldAlias.containsKey(sf.getFldalias()))
            doAdd(sf);
        sf = new SelectFldVO();
        sf.setFldalias("bpmcellvalue");
        sf.setFldname(NCLangRes.getInstance().getStrByID("10241201", "UPP10241201-000898"));
        sf.setExpression("0.0");
        if(!hashFldAlias.containsKey(sf.getFldalias()))
            doAdd(sf);
    }

    public static void main(String args[])
    {
        try
        {
            JFrame frame = new JFrame();
            SetTablePanel aSetTablePanel = new SetTablePanel();
            frame.setContentPane(aSetTablePanel);
            frame.setSize(aSetTablePanel.getSize());
            frame.addWindowListener(new WindowAdapter() {

                public void windowClosing(WindowEvent e)
                {
                    System.exit(0);
                }

            }
);
            frame.setVisible(true);
            Insets insets = frame.getInsets();
            frame.setSize(frame.getWidth() + insets.left + insets.right, frame.getHeight() + insets.top + insets.bottom);
            frame.setVisible(true);
        }
        catch(Throwable exception)
        {
            System.err.println("nc.ui.pub.beans.UIPanel \u7684 main() \u4E2D\u53D1\u751F\u5F02\u5E38");
            exception.printStackTrace(System.out);
        }
    }

    public void pnEast1_MouseClicked(MouseEvent mouseEvent)
    {
        if(mouseEvent.isControlDown())
            killBPM();
    }

    public void setFldGenDlgAsNull()
    {
        m_fldGenDlg = null;
    }

    public void setQueryDefTabbedPn(QueryDefTabbedPn qdtp)
    {
        m_parent = qdtp;
    }

    public void setResultToFld(SelectFldVO sfs[], OrderbyFldVO ofs[])
    {
        Hashtable hashAliasAsc = new Hashtable();
        int iLen = ofs != null ? ofs.length : 0;
        for(int i = 0; i < iLen; i++)
            if(ofs[i].getFldalias() != null)
                hashAliasAsc.put(ofs[i].getFldalias(), ofs[i].getAsc());

        iLen = sfs != null ? sfs.length : 0;
        for(int i = 0; i < iLen; i++)
        {
            String alias = sfs[i].getFldalias();
            Object objrows[] = {
                "", sfs[i].getExpression(), sfs[i].getFldname(), alias, sfs[i].getNote()
            };
            getTM().addRow(objrows);
        }

    }

    public void setTableCell()
    {
        DefaultTableCellRenderer renderer = null;
        for(int i = 0; i < getTable().getColumnCount(); i++)
        {
            TableColumn tc = getTable().getColumnModel().getColumn(i);
            if(i == 0)
                renderer = new RowNoCellRenderer();
            else
                renderer = new DefaultTableCellRenderer();
            renderer.setHorizontalAlignment(0);
            tc.setCellRenderer(renderer);
        }

    }

    public void valueChanged(ListSelectionEvent e)
    {
        if(getTable().getSelectedRowCount() > 1)
        {
            getBnModify().setEnabled(false);
            getBnUp().setEnabled(false);
            getBnDown().setEnabled(false);
        } else
        {
            getBnModify().setEnabled(true);
            getBnUp().setEnabled(true);
            getBnDown().setEnabled(true);
        }
    }

    private QueryDefTabbedPn m_parent;
    private FldGenDlg m_fldGenDlg;
    public static final int COL_FLDEXP = 1;
    public static final int COL_FLDNAME = 2;
    public static final int COL_FLDALIAS = 3;
    public static final int COL_FLDNOTE = 4;
    private UIPanel ivjPnEast;
    private UIPanel ivjPnNorth;
    private UIPanel ivjPnSouth;
    private UIPanel ivjPnWest;
    private UITablePane ivjTablePn;
    private UIButton ivjBnAdd;
    private UIButton ivjBnDel;
    private UIButton ivjBnModify;
    private UIButton ivjBnUp;
    private UIButton ivjBnDown;
    IvjEventHandler ivjEventHandler;
}
